package com.video.upload.domain.po;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("filelist")
public class FileList implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 文件id
     */
    private String fileId;

    /**
     * 文件md5
     */
    private String md5;

    /**
     * 文件访问地址
     */
    private String url;

    /**
     * 存储桶
     */
    private String bucket;

    /**
     * minio中文件名
     */
    private String object;

    /**
     * 文件大小
     */
    private Double size;

    /**
     * 文件类型
     */
    private String type;

    /**
     * 分片大小
     */
    private Long chunkSize;

    /**
     * 分片数量
     */
    private Integer chunkCount;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;
}
